public string AgreeProtest_Save(string AgreePercentProtestID, string AgreementPercentID, string ProtestComment, string ProtestDate, string UserResponseID ) { try { ClAgreePercentProtest cl = new ClAgreePercentProtest(); cl.AgreementPercentID = Convert.ToInt32(AgreementPercentID); cl.AgreePercentProtestID = Convert.ToInt32(AgreePercentProtestID); cl.ProtestComment = ProtestComment; cl.ProtestDate = DateConvert.sh2m(ProtestDate).ToString(); cl.UserResponseID = Convert.ToInt32(UserResponseID); int y = 0; if (AgreePercentProtestID == null || AgreePercentProtestID == "" || AgreePercentProtestID == "0") { y = AgreePercentProtestClass.insert(cl); } else { y = AgreePercentProtestClass.Update(cl); } return(y.ToString()); } catch { return("0"); } }
//public void UpItem(object sender, EventArgs e) //{ // String AgreementFineID = ((HtmlAnchor)sender).HRef.ToString(); // LblParamAgreementFineID.Text = AgreementFineID; // ClAgreePercentProtest cl = new ClAgreePercentProtest(); // cl.AgreementFineID = Convert.ToInt32(AgreementFineID); // Data = cl; // LightBox.Value = "1"; //} protected void BtnInsert_Click(Object sender, System.EventArgs e) { ClAgreePercentProtest cl = new ClAgreePercentProtest(); cl = Data; int t = 0; if (CSharp.PublicFunction.ModeInsert(AgreePercentProtestID.ToString())) { t = AgreePercentProtestClass.insert(cl); } else { t = AgreePercentProtestClass.Update(cl); } if (t == 0) { LblMsg.ForeColor = System.Drawing.Color.Red; LblMsg.Text = "خطا در ثبت"; } else { LblMsg.ForeColor = System.Drawing.Color.Green; LblMsg.Text = "ثبت انجام شد."; BindGrid(); } // LightBox.Value = "0"; LblParamAgreePercentProtestID.Text = "0"; }