protected void pageSave(Object sender, BrilliantWMS.ToolbarService.iUCToolbarClient e) { CustomProfile profile = CustomProfile.GetProfile(); iCompanySetupClient ratecardclient = new iCompanySetupClient(); mRateCard RateCard = new mRateCard(); if (hndState.Value == "Edit") { RateCard = ratecardclient.GetRateCardByID(long.Parse(hdnratecardId.Value), profile.DBConnection._constr); } RateCard.Type = ddlaccounttypeer.SelectedItem.Text; RateCard.RateDetails = txtratetitle.Text; RateCard.Rate = decimal.Parse(txtprice.Text); RateCard.FromDate = UC_Startdt.Date; RateCard.ToDate = UC_enddt.Date; RateCard.EffDate = UC_effectivedt.Date; RateCard.CompanyID = long.Parse(ddlgroupcompany.SelectedItem.Value); RateCard.RateType = long.Parse(ddlratetype.SelectedItem.Value); RateCard.AccountID = long.Parse(hdnAccountID.Value); RateCard.Remark = txtremark.Text; RateCard.AccountName = hdnAccountName.Value; RateCard.Active = "Yes"; if (rbtnActiveNo.Checked == true) { RateCard.Active = "No"; } if (hndState.Value == "Edit") { RateCard.ModifiedBy = profile.Personal.UserID; RateCard.ModifiedDate = DateTime.Now; long ratecardID = ratecardclient.SaveRateCardMaster(RateCard, profile.DBConnection._constr); WebMsgBox.MsgBox.Show("Record Updated Successfully"); } else { RateCard.CreatedBy = profile.Personal.UserID; RateCard.CreationDate = DateTime.Now; long ratecardID = ratecardclient.SaveRateCardMaster(RateCard, profile.DBConnection._constr); WebMsgBox.MsgBox.Show("Record Saved Successfully"); } clr(); MainRateCardGrid(); ActiveTab("Load"); }