取得上个月月初日期
//取得上个月
int lastMonth = DateTime.Now.Month - 1 == 0 ? 12 : DateTime.Now.Month - 1;
//取得上个月月初日期
string lastMonthDate = (DateTime.Now.Month - 1 == 0 ? Convert.ToString(DateTime.Now.Year - 1) : DateTime.Now.Year.ToString()) + "-" + lastMonth.ToString() + "-" + "1";