Ejemplo n.º 1
0
    public void DoYes1(string bgmonid, string mon)
    {
        BG_Mon bgMon = BG_MonManager.GetBG_MonByBGID(common.IntSafeConvert(bgmonid));

        bgMon.BGMon = ParToDecimal.ParToDel(mon);
        BG_MonManager.ModifyBG_Mon(bgMon);
        X.Msg.Alert("提示", "录入金额修改成功!").Show();
    }
Ejemplo n.º 2
0
 protected void btnImport_DirectClick(object sender, DirectEventArgs e)
 {
     if (Radio1.Checked)
     {
         decimal mon     = ParToDecimal.ParToDel(TFMon.Text);
         int     bgmonid = BG_MonLogic.GEtIDisEditMon(common.IntSafeConvert(CurrentYear));
         if (bgmonid > 0)
         {
             //BG_Mon bgMon=BG_MonManager.GetBG_MonByBGID(bgmonid);
             //bgMon.BGMon = mon;
             //BG_MonManager.ModifyBG_Mon(bgMon);
             //X.Msg.Alert("提示", "数据已初始化,无法修改.").Show();
             string luruyes = string.Format("luru.DoYes1({0},{1})", bgmonid, mon);
             if (BG_MonManager.GetBG_MonByBGID(bgmonid).BGMon > mon)
             {
                 X.Msg.Confirm("提示", "录入金额少于上次录入金额,是否保存?", new MessageBoxButtonsConfig
                 {
                     Yes = new MessageBoxButtonConfig
                     {
                         Handler = luruyes,
                         Text    = "是"
                     },
                     No = new MessageBoxButtonConfig
                     {
                         Handler = "luru.DoNo1()",
                         Text    = "否"
                     }
                 }).Show();
             }
             else
             {
                 BG_Mon bgMon = BG_MonManager.GetBG_MonByBGID(bgmonid);
                 bgMon.BGMon = mon;
                 BG_MonManager.ModifyBG_Mon(bgMon);
                 X.Msg.Alert("提示", "录入金额修改成功!").Show();
             }
         }
         else
         {
             BG_Mon bgMon = new BG_Mon();
             bgMon.BGYear    = common.IntSafeConvert(CurrentYear);
             bgMon.BGMon     = mon;
             bgMon.IsEditMon = 1;
             BG_MonManager.AddBG_Mon(bgMon);
             X.Msg.Alert("提示", "保存成功!").Show();
         }
     }
     else
     {
         if (FUFEXC.HasFile)
         {
             dtBind();
             // X.Msg.Alert("提示", "导入成功!").Show();
             //string message = "导入成功!";
             //Response.Write("<script language=javascript>alert(\"" + message.Trim() + "\");window.top.close();</script>");
         }
         else
         {
             X.Msg.Notify(new NotificationConfig()
             {
                 Title = "提示",
                 Html  = "                                         请先选择文件!",
                 Width = 250
             }).Show();
         }
     }
 }