Exemplo n.º 1
0
        private void riDesc_EditValueChanged(object sender, EventArgs e)
        {
            DataRow row       = gvSuppCon.GetDataRow(gvSuppCon.FocusedRowHandle);
            object  sourceRow = riDesc.GetDataSourceRowByKeyValue(((LookUpEdit)sender).EditValue);

            if (sourceRow != null)
            {
                row["project_required"]     = Convert.ToBoolean(((DataRowView)sourceRow)["project_required"]);
                row[colFrequency.FieldName] = ((DataRowView)sourceRow)["Frequency"].ToString();
            }
            else
            {
                row["project_required"]     = false;
                row[colFrequency.FieldName] = "";
            }
            row[colpri_id_Code.FieldName] = DBNull.Value;
            row[colExpiry.FieldName]      = DBNull.Value;

            LookUpEdit lue = sender as LookUpEdit;

            if (lue != null)
            {
                object oID = lue.EditValue;
                if (oID == null || oID == DBNull.Value)
                {
                    oID = -1;
                }
                DataRow dr = gvSuppCon.GetDataRow(gvSuppCon.FocusedRowHandle);
                if (dr != null)
                {
                    Compliance.LoadRules(Connection, dr, Convert.ToInt32(oID));
                }
            }
        }
Exemplo n.º 2
0
        private void ComplianceChange_EditValueChanged(object sender, EventArgs e)
        {
            LookUpEdit lue = sender as LookUpEdit;

            if (lue != null)
            {
                object oID = lue.EditValue;
                if (oID == null || oID == DBNull.Value)
                {
                    oID = -1;
                }
                DataRow dr = gvProjView.GetDataRow(gvProjView.FocusedRowHandle);
                if (dr != null)
                {
                    Compliance.LoadRules(Connection, dr, Convert.ToInt32(oID));
                }
            }
        }