Exemple #1
0
        protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
        {
            if (_bilCollectionManager.IsSpeacialEntryExist(txtCollectionId.Text) == false)
            {
                _bilCollectionManager = new BillCollectionManager();
                AuthenticationManager       authenticationManger        = new AuthenticationManager();
                EncryptionDecryptionManager encryptionDecriptionManager = new EncryptionDecryptionManager();
                authenticationManger.ConnectionString = MtbBillCollection.WebConfigManager.GetCollDBConnString();
                String userId   = (String)Session[MtbBillCollection.Global.Definitions.SessionVariable.Value.UserId];
                string password = txtPassword.Text;
                password = encryptionDecriptionManager.ComputeHash(password, new byte[password.Length]);
                if (authenticationManger.IsActiveUser(userId, password) == true && MtbBillCollection.Utility.Screen.IsUserPermitedToAccessScreen(Convert.ToInt32(Session["userTypeId"].ToString()), "Clearing"))
                {
                    _collectionId = txtCollectionId.Text;
                    BillCollectionInfo billCollInfo = _bilCollectionManager.GetCollectionInformtion(_collectionId);
                    billCollInfo.ColectionId = int.Parse(txtCollectionId.Text);
                    _bilCollectionManager.MarkAsSpeacialEdit(billCollInfo.ColectionId, billCollInfo.BranchCode, userId, DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), txtReason.Text);
                    billCollInfo.CollStatus = MtbBillCollection.Global.Definitions.CollectionStatus.Value.SpeacialEdit;

                    ShowPopup(true, false, "");
                    //_bilCollectionManager.UpdateCollectionInformation(billCollInfo);
                }
            }
            else
            {
                ShowPopup(true, true, "Data can not save. Invalid User Id or Password or you don't have access.");

                //Show Messege
            }
        }